package mc

import (
	"gitee.com/dreamwood/ez-go/db/mgo"
)

const (
	ComSnRuleEventNew          = "tool.ComSnRuleNew"
	ComSnRuleEventBeforeCreate = "tool.ComSnRuleBeforeCreate"
	ComSnRuleEventBeforeUpdate = "tool.ComSnRuleBeforeUpdate"
	ComSnRuleEventBeforeSave   = "tool.ComSnRuleBeforeCreate tool.ComSnRuleBeforeUpdate"
	ComSnRuleEventAfterCreate  = "tool.ComSnRuleAfterCreate"
	ComSnRuleEventAfterUpdate  = "tool.ComSnRuleAfterUpdate"
	ComSnRuleEventAfterSave    = "tool.ComSnRuleAfterCreate tool.ComSnRuleAfterUpdate"
	ComSnRuleEventDelete       = "tool.ComSnRuleDelete"
)

func GetComSnRuleConfig() *mgo.DocConfig {
	return ComSnRule_Config
}

var ComSnRule_Config *mgo.DocConfig

func init() {
	ComSnRule_Config = NewComSnRuleConfig()
}
func NewComSnRuleConfig() *mgo.DocConfig {
	return &mgo.DocConfig{
		ContainerKey: "tool.ComSnRule",
		Fields: []string{
			"name", "code", "attrChain",
		},
		RelationFields:  []string{},
		RelationConfigs: map[string]*mgo.DocRelation{},
		FieldFilter: map[string]*mgo.DocFieldFilter{
			"default": {
				Select: []string{},
				Omit:   []string{},
			},
		},
	}
}
